package test

import (
	"context"
	"fmt"
	"google.golang.org/protobuf/types/known/emptypb"
	"lw-shop/goods_service/proto"
)

func GetAllCategorysList(goodsClient proto.GoodsClient) {
	result, err := goodsClient.GetAllCategorysList(context.Background(), &emptypb.Empty{})
	if err != nil {
		panic(err)
	}
	fmt.Println(result.JsonData)
}

func DbCategoryTree(goodsClient proto.GoodsClient) {
	result, err := goodsClient.DBQueryCategoryList(context.Background(), &emptypb.Empty{})
	if err != nil {
		panic(err)
	}
	fmt.Println(result.JsonData)
}
